﻿<link rel="stylesheet" href="{TPL}css/topad.css" type="text/css" media="screen"  />
<link rel="stylesheet" href="{TPL}css/default.css" type="text/css" media="screen"  />
<link rel="stylesheet" href="{TPL}css/grouplist.css" type="text/css" media="screen"  />
<link rel="stylesheet" href="{TPL}css/article.css" type="text/css" media="screen"  />

<link rel="icon" href="images/favicon.ico" type="image/ico" />

<script type="text/javascript" src="{TPL}js/jquery1.4.2.js"></script>
<script type="text/javascript" src="{TPL}js/jquery.cookie.js"></script>
<script type="text/javascript" src="{TPL}js/jquery.pngFix.js"></script>
<script type="text/javascript" src="{TPL}js/script.js"></script>
<script type="text/javascript" src="{TPL}js/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
<script type="text/javascript" src="{TPL}js/fancybox/jquery.fancybox-1.3.1.js"></script>
<script type="text/javascript" src="{TPL}js/jquery.validate.js"></script>
<link rel="stylesheet" type="text/css" href="{TPL}js/fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<script type="text/javascript">
	{if !empty($ERROR_MSG)}
	jQuery(function($){
	$.showErr("{$ERROR_MSG}");
	});
	{/if}
	
	$(function(){
		$(".3form").hide();	
		$(".req1").hide();
		
		$(".chk2").click(function(){
			var id=$(this).val();
			if(id == 2){
				$(".2form").slideDown();
				$(".3form").slideUp();
			}
			if(id == 3){
				$(".3form").slideDown();
				$(".2form").slideUp();
			}
		
		});
		$(".chk").click(function(){
			if($(".req1:visible").length>0){
				$(".req1").slideUp();			
			}else{
				$(".req1").slideDown();
			}
		});
	});
	
</script>
<script type="text/javascript">
//<![CDATA[
linkarr = new Array();
picarr = new Array();
textarr = new Array();
var files = "";
var links = "";
var texts = "";
//�o�̳]�m�եμаO
{eval $i=1;}
{loop $value['imgarray'] $key $r}	
	linkarr[{$i}] = "###";
	picarr[{$i}]  = "{$r['filepath']}";
	textarr[{$i}] = "###";
	{eval $i++;}
{/loop}	

for(i=1;i<picarr.length;i++){
	if(files=="") files = "<img src="+picarr[i]+">";
	else files += "<img src="+picarr[i]+">";
}

//jquery
$(function(){
	$(".imgbox").html(files);
})
//adshow
var timer;
	$(function(){
		$('.imgbox img').each(function(i){
			var _this = $(this),
				img = _this.attr('src'),
				imgTitle = _this.attr('title');

			$('.showbox').append('<li><img src="' + img + '" title="Buy917團購網" /></li>');
			$('.btnlink').append('<div class="btn_off" title="' + (i+1) + '">' + (i+1) + '</div>');
			$('.adblock .btnlink div').eq(0).addClass('btn_on');
		});

		$('.btnlink div').click(function(){
			clearTimeout(timer);
			var _this = $(this),
				_index = $('.btnlink div').index(_this);
			_this.addClass('btn_on').siblings().removeClass('btn_on');
			$('.showbox').animate({
				left: _index*-650
			});
			timer = setTimeout('imgshow()', 6000);
		});
		timer = setTimeout('imgshow()', 6000);
	});

	function imgshow(){
		var _li = $('.showbox li'),
			_index = (parseInt($('.showbox').css('left'), 10) || 0)/(-650);
		_index = (_index+1) % _li.length;
		$('.btnlink div').eq(_index).click();
	}

//]]>
</script> 

<SCRIPT language=javascript>
$(document).ready(function() {
		$("#maplink").fancybox({
			'width'				: '75%',
			'height'			: '75%',
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
			
});	
</script>

{php $value['group_buynum']=$value['group_buynum']+$value['group_startnum'];}
{php $value['group_usernum']=$value['group_usernum']+$value['group_startnum'];}
<script type="text/javascript">
{if !empty($ERROR_MSG)}
jQuery(function($){
$.showErr("{$ERROR_MSG}");
});
{/if}	
</script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19541623-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script> 
</head>